<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Magic number (programming)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Magic_number_(programming)"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Magic_number_programming rootpage-Magic_number_programming skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Magic number (programming)</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p class="mw-empty-elt">
</p><p>In <a href="Computer_programming" title="Computer programming">computer programming</a>, a <b>magic number</b> is any of the following:
</p>
<ul><li>A unique value with <b>unexplained meaning</b> or multiple occurrences which could (preferably) be replaced with a named constant.</li>
<li>A constant numerical or text value used to <b>identify</b> a <a href="File_format" title="File format">file format</a> or protocol <style data-mw-deduplicate="TemplateStyles:r1033199720">
/* start https://en.wikipedia.org/ */
.mw-parser-output div.crossreference{padding-left:0}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><span role="note" class="hatnote navigation-not-searchable crossreference">(for files, see <a href="List_of_file_signatures" title="List of file signatures">List of file signatures</a></span>).</li>
<li>A distinctive unique value that is <b>unlikely to be mistaken</b> for other meanings (e.g., <a href="Universally_unique_identifier" title="Universally unique identifier">Universally Unique Identifiers</a>).</li></ul>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Unnamed_numerical_constants">Unnamed numerical constants</h2></div>
<p>The term <i><b>magic number</b></i> or <i><b>magic constant</b></i> refers to the <a href="Anti-pattern" title="Anti-pattern">anti-pattern</a> of using numbers directly in source code. This breaks one of the oldest rules of programming, dating back to the <a href="COBOL" title="COBOL">COBOL</a>, <a href="FORTRAN" class="mw-redirect" title="FORTRAN">FORTRAN</a> and <a href="PL/1" class="mw-redirect" title="PL/1">PL/1</a> manuals of the 1960s.<sup id="cite_ref-MartinG25_1-0" class="reference"><a href="#cite_note-MartinG25-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p><p>In the following example that computes the price after tax, <code>1.05</code> is considered a magic number:
</p>
<pre>price_tax = 1.05 * price
</pre>
<p>The use of unnamed magic numbers in code obscures the developers' intent in choosing that number,<sup id="cite_ref-MartinG16_2-0" class="reference"><a href="#cite_note-MartinG16-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> increases opportunities for subtle errors, and makes it more difficult for the program to be adapted and extended in the future.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> As an example, it is difficult to tell whether every digit in <code><a href="Pi" title="Pi">3.14159265358979323846</a></code> is correctly typed, or if this constant for <a href="Pi" title="Pi">pi</a> can be <a href="Truncation" title="Truncation">truncated</a> to <code>3.14159</code> without affecting the functionality of the program with its reduced precision. Replacing all significant magic numbers with named <a href="Constant_(programming)" class="mw-redirect" title="Constant (programming)">constants</a> (also called explanatory variables) makes programs easier to read, understand and maintain.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p><p>The example above can be improved by adding a descriptively named variable:
</p>
<pre>TAX = 0.05
price_tax = (1.0 + TAX) * price
</pre>
<p>Names chosen to be meaningful in the context of the program can result in code that is more easily understood by a maintainer who is not the original author (or even by the original author after a period of time).<sup id="cite_ref-Paul_2002_SYMBOLS_5-0" class="reference"><a href="#cite_note-Paul_2002_SYMBOLS-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> An example of an uninformatively named constant is <code>int SIXTEEN = 16</code>, while <code>int NUMBER_OF_BITS = 16</code> is more descriptive.
</p><p>The problems associated with magic 'numbers' described above are not limited to numerical types and the term is also applied to other data types where declaring a named constant would be more flexible and communicative.<sup id="cite_ref-MartinG25_1-1" class="reference"><a href="#cite_note-MartinG25-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> Thus, declaring <code>const string testUserName = "John"</code> is better than several occurrences of the 'magic value' <code>"John"</code> in a <a href="Test-driven_development" title="Test-driven development">test suite</a>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Random_shuffle_example">Random shuffle example</h3></div>
<p>For example, if it is required to randomly shuffle the values in an array representing a standard pack of <a href="Playing_cards" class="mw-redirect" title="Playing cards">playing cards</a>, this <a href="Pseudocode" title="Pseudocode">pseudocode</a> does the job using the <a href="Fisher%E2%80%93Yates_shuffle" title="Fisher–Yates shuffle">Fisher–Yates shuffle</a> algorithm:
</p>
<pre><b>for</b> i <b>from</b> 1 <b>to</b> 52
j := i + randomInt(53 - i) - 1
a.swapEntries(i, j)
</pre>
<p>where <code>a</code> is an array object, the function <code>randomInt(x)</code> chooses a random integer between 1 and <i>x</i>, inclusive, and <code>swapEntries(i, j)</code> swaps the <i>i</i>th and <i>j</i>th entries in the array. In the preceding example, <code>52</code> and <code>53</code> are magic numbers, also not clearly related to each other. It is considered better programming style to write the following:
</p>
<pre><i>int</i> deckSize:= 52
<b>for</b> i <b>from</b> 1 <b>to</b> deckSize
j := i + randomInt(deckSize + 1 - i) - 1
a.swapEntries(i, j)
</pre>
<p>This is preferable for several reasons:
</p>
<ul><li><b>Better readability</b>. A programmer reading the first example might wonder, <i>What does the number 52 mean here? Why 52?</i> The programmer might infer the meaning after reading the code carefully, but it is not obvious.<sup id="cite_ref-Paul_2002_SYMBOLS_5-1" class="reference"><a href="#cite_note-Paul_2002_SYMBOLS-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> Magic numbers become particularly confusing when the same number is used for different purposes in one section of code.</li>
<li><b>Easier to maintain</b>. It is easier to alter the value of the number, as it is not duplicated. Changing the value of a magic number is error-prone, because the same value is often used several times in different places within a program.<sup id="cite_ref-Paul_2002_SYMBOLS_5-2" class="reference"><a href="#cite_note-Paul_2002_SYMBOLS-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> Also, when two semantically distinct variables or numbers have the same value they may be accidentally both edited together.<sup id="cite_ref-Paul_2002_SYMBOLS_5-3" class="reference"><a href="#cite_note-Paul_2002_SYMBOLS-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> To modify the first example to shuffle a <a href="Tarot" title="Tarot">Tarot</a> deck, which has 78 cards, a programmer might naively replace every instance of 52 in the program with 78. This would cause two problems. First, it would miss the value 53 on the second line of the example, which would cause the algorithm to fail in a subtle way. Second, it would likely replace the characters "52" everywhere, regardless of whether they refer to the deck size or to something else entirely, such as the number of weeks in a Gregorian calendar year, or more insidiously, are part of a number like "1523", all of which would introduce bugs. By contrast, changing the value of the <code>deckSize</code> variable in the second example would be a simple, one-line change.</li>
<li><b>Encourages documentation</b>.<sup id="cite_ref-Paul_2002_SYMBOLS_5-4" class="reference"><a href="#cite_note-Paul_2002_SYMBOLS-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> The single place where the named variable is declared makes a good place to document what the value means and why it has the value it does. Having the same value in a plethora of places either leads to duplicate comments (and attendant problems when updating some but missing some) or leaves no <i>one</i> place where it's both natural for the author to explain the value and likely the reader shall look for an explanation.</li>
<li><b>Coalesces information</b>. The declarations of "magic number" variables can be placed together, usually at the top of a function or file, facilitating their review and change.<sup id="cite_ref-Paul_2002_SYMBOLS_5-5" class="reference"><a href="#cite_note-Paul_2002_SYMBOLS-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup></li>
<li><b>Detects <a href="Typo" class="mw-redirect" title="Typo">typos</a></b>. Using a variable (instead of a literal) takes advantage of a compiler's checking. Accidentally typing "62" instead of "52" would go undetected, whereas typing "<code>dekSize</code>" instead of "<code>deckSize</code>" would result in the compiler's warning that <code>dekSize</code> is undeclared.</li>
<li><b>Reduces typing</b>. If a <a href="Integrated_development_environment" title="Integrated development environment">IDE</a> supports <a href="Code_completion" title="Code completion">code completion</a>, it will fill in most of the variable's name from the first few letters.</li>
<li><b>Facilitates parameterization</b>. For example, to generalize the above example into a procedure that shuffles a deck of any number of cards, it would be sufficient to turn <code>deckSize</code> into a parameter of that procedure, whereas the first example would require several changes.</li></ul>
<pre><b>function</b> shuffle (<b>int</b> deckSize)
<b>for</b> i <b>from</b> 1 <b>to</b> deckSize
j := i + randomInt(deckSize + 1 - i) - 1
a.swapEntries(i, j)
</pre>
<p>Disadvantages are:
</p>
<ul><li><b>Breaks locality</b>. When the named constant is not defined near its use, it hurts the locality, and thus comprehensibility, of the code. Putting the 52 in a possibly distant place means that, to understand the workings of the "for" loop completely (for example to estimate the run-time of the loop), one must track down the definition and verify that it is the expected number. This is easy to avoid (by relocating the declaration) when the constant is only used in one portion of the code. When the named constant is used in disparate portions, on the other hand, the remote location is a clue to the reader that the same value appears in other places in the code, which may also be worth looking into.</li>
<li><b>Causes verbosity</b>. The declaration of the constant adds a line. When the constant's name is longer than the value's, particularly if several such constants appear in one line, it may make it necessary to split one logical statement of the code across several lines. An increase in verbosity may be justified when there is some likelihood of confusion about the constant, or when there is a likelihood the constant may need to be changed, such as <a href="Code_reuse" title="Code reuse">reuse</a> of a shuffling routine for other card games. It may equally be justified as an increase in expressiveness.</li>
<li><b>Performance considerations</b>. It may be slower to process the expression <code>deckSize + 1</code> at run-time than the value "53". That being said, most modern compilers will use techniques like <a href="Constant_folding" title="Constant folding">constant folding</a> and <a href="Loop_optimization" title="Loop optimization">loop optimization</a> to resolve the addition during compilation, so there is usually no or negligible speed penalty compared to using magic numbers in code. Especially the cost of debugging and the time needed trying to understand non-explanatory code must be held against the tiny calculation cost.</li></ul>
<div class="mw-heading mw-heading3"><h3 id="Accepted_uses">Accepted uses </h3></div>
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */
.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style>
<p>In some contexts, the use of unnamed numerical constants is generally accepted (and arguably "not magic"). While such acceptance is subjective, and often depends on individual coding habits, the following are common examples:
</p>
<ul><li>the use of 0 and 1 as initial or incremental values in a <a href="For_loop" title="For loop">for loop</a>, such as <code class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" style="" dir="ltr"><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">max</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span></code></li>
<li>the use of 2 to check whether a number is even or odd, as in <code>isEven = (x % 2 == 0)</code>, where <code>%</code> is the <a href="Modulo" title="Modulo">modulo</a> operator</li>
<li>the use of simple arithmetic constants, e.g., in expressions such as <code>circumference = 2 * Math.PI * radius</code>,<sup id="cite_ref-MartinG25_1-2" class="reference"><a href="#cite_note-MartinG25-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> or for calculating the <a href="Discriminant" title="Discriminant">discriminant</a> of a <a href="Quadratic_equation" title="Quadratic equation">quadratic equation</a> as <code>d = b^2 − 4*a*c</code></li>
<li>the use of powers of 10 to convert metric values (e.g. between grams and kilograms) or to calculate percentage and <a href="Per_mille" title="Per mille">per mille</a> values</li>
<li>exponents in expressions such as <code>(f(x) ** 2 + f(y) ** 2) ** 0.5</code> for <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\sqrt {f(x)^{2}+f(y)^{2}}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<msqrt>
<mi>f</mi>
<mo stretchy="false">(</mo>
<mi>x</mi>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo>+</mo>
<mi>f</mi>
<mo stretchy="false">(</mo>
<mi>y</mi>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</msqrt>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\sqrt {f(x)^{2}+f(y)^{2}}}}</annotation>
</semantics>
</math></span><img src="./9a960b14a0d27f89ad3f688426a3f019261aded3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.671ex; width:15.934ex; height:4.843ex;" alt="{\displaystyle {\sqrt {f(x)^{2}+f(y)^{2}}}}" loading="lazy"></span></li></ul>
<p>The constants 1 and 0 are sometimes used to represent the <a href="Boolean_data_type" title="Boolean data type">Boolean</a> values true and false in programming languages without a Boolean type, such as older versions of <a href="C_(programming_language)" title="C (programming language)">C</a>. Most modern programming languages provide a <code>boolean</code> or <code>bool</code> <a href="Primitive_type" class="mw-redirect" title="Primitive type">primitive type</a> and so the use of 0 and 1 is ill-advised. This can be more confusing since 0 sometimes means programmatic success (when -1 means failure) and failure in other cases (when 1 means success).
</p><p>In C and C++, 0 represents the <a href="Null_pointer" title="Null pointer">null pointer</a>. As with Boolean values, the C standard library includes a macro definition <code>NULL</code> whose use is encouraged. Other languages provide a specific <code>null</code> or <code>nil</code> value and when this is the case no alternative should be used. The typed pointer constant <code>nullptr</code> has been introduced with C++11.
</p>
<div class="mw-heading mw-heading2"><h2 id="Format_indicators">Format indicators </h2></div>
<div class="mw-heading mw-heading3"><h3 id="Origin">Origin </h3></div>
<p>Format indicators were first used in early <a href="Version_7_Unix" title="Version 7 Unix">Version 7 Unix</a> source code.
</p><p><a href="Unix" title="Unix">Unix</a> was ported to one of the first <a href="Digital_Equipment_Corporation" title="Digital Equipment Corporation">DEC</a> <a href="PDP-11" title="PDP-11">PDP-11</a>/20s, which did not have <a href="Memory_protection" title="Memory protection">memory protection</a>. So early versions of Unix used the <a href="Position-independent_code" title="Position-independent code">relocatable memory reference</a> model.<sup id="cite_ref-dmr_6-0" class="reference"><a href="#cite_note-dmr-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> Pre-<a href="Sixth_Edition_Unix" class="mw-redirect" title="Sixth Edition Unix">Sixth Edition Unix</a> versions read an executable file into <a href="Magnetic-core_memory" title="Magnetic-core memory">memory</a> and jumped to the first low memory address of the program, <a href="Relative_address" class="mw-redirect" title="Relative address">relative address</a> zero. With the development of <a href="Memory_page" class="mw-redirect" title="Memory page">paged</a> versions of Unix, a <a href="Header_(computing)" title="Header (computing)">header</a> was created to describe the <a href="Executable" title="Executable">executable image</a> components. Also, a <a href="Branch_instruction" class="mw-redirect" title="Branch instruction">branch instruction</a> was inserted as the first word of the header to skip the header and start the program. In this way a program could be run in the older relocatable memory reference (regular) mode or in paged mode. As more executable formats were developed, new constants were added by incrementing the branch <a href="Offset_(computer_science)" title="Offset (computer science)">offset</a>.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>
</p><p>In the <a href="Version_6_Unix" title="Version 6 Unix">Sixth Edition</a> <a href="Lions'_Commentary_on_UNIX_6th_Edition%2C_with_Source_Code" class="mw-redirect" title="Lions' Commentary on UNIX 6th Edition, with Source Code">source code</a> of the Unix program loader, the exec() function read the executable (<a href="Binary_numeral_system" class="mw-redirect" title="Binary numeral system">binary</a>) image from the file system. The first 8 <a href="Byte" title="Byte">bytes</a> of the file was a <a href="Header_(computing)" title="Header (computing)">header</a> containing the sizes of the program (text) and initialized (global) data areas. Also, the first 16-bit word of the header was compared to two <a href="Constant_(programming)" class="mw-redirect" title="Constant (programming)">constants</a> to determine if the <a href="Executable" title="Executable">executable image</a> contained <a href="Position-independent_code" title="Position-independent code">relocatable memory references</a> (normal), the newly implemented <a href="Memory_page" class="mw-redirect" title="Memory page">paged</a> read-only executable image, or the separated instruction and data paged image.<sup id="cite_ref-V6sys1_8-0" class="reference"><a href="#cite_note-V6sys1-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> There was no mention of the dual role of the header constant, but the high order byte of the constant was, in fact, the <a href="Operation_code" class="mw-redirect" title="Operation code">operation code</a> for the PDP-11 branch instruction (<a href="Octal" title="Octal">octal</a> 000407 or <a href="Hexadecimal" title="Hexadecimal">hex</a> 0107). Adding seven to the program counter showed that if this constant was <a href="Executable" title="Executable">executed</a>, it would branch the Unix exec() service over the executable image eight byte header and start the program.
</p><p>Since the Sixth and Seventh Editions of Unix employed paging code, the dual role of the header constant was hidden. That is, the exec() service read the executable file header (<a href="Meta_(prefix)" title="Meta (prefix)">meta</a>) data into a <a href="Kernel_space" class="mw-redirect" title="Kernel space">kernel space</a> buffer, but read the executable image into <a href="User_space" class="mw-redirect" title="User space">user space</a>, thereby not using the constant's branching feature. Magic number creation was implemented in the Unix <a href="Linker_(computing)" title="Linker (computing)">linker</a> and <a href="Loader_(computing)" title="Loader (computing)">loader</a> and magic number branching was probably still used in the suite of <a href="Standalone_program" title="Standalone program">stand-alone</a> <a href="Diagnostic_program" title="Diagnostic program">diagnostic programs</a> that came with the Sixth and Seventh Editions. Thus, the header constant did provide an illusion and met the criteria for <a href="Magic_(programming)" title="Magic (programming)">magic</a>.
</p><p>In Version Seven Unix, the header constant was not tested directly, but assigned to a variable labeled <b>ux_mag</b><sup id="cite_ref-V7sys1_9-0" class="reference"><a href="#cite_note-V7sys1-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> and subsequently referred to as the <b>magic number</b>. Probably because of its uniqueness, the term <b>magic number</b> came to mean executable format type, then expanded to mean file system type, and expanded again to mean any type of file.
</p>
<div class="mw-heading mw-heading3"><h3 id="In_files">In files </h3></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="File_format#Magic_number" title="File format">File format § Magic number</a></div>
<div role="note" class="hatnote navigation-not-searchable">See also: <a href="List_of_file_signatures" title="List of file signatures">List of file signatures</a></div>
<p>Magic numbers are common in programs across many operating systems. Magic numbers implement <a href="Strongly_typed" class="mw-redirect" title="Strongly typed">strongly typed</a> data and are a form of <a href="In-band_signaling" title="In-band signaling">in-band signaling</a> to the controlling program that reads the data type(s) at program run-time. Many files have such constants that identify the contained data. Detecting such constants in files is a simple and effective way of distinguishing between many <a href="File_format" title="File format">file formats</a> and can yield further run-time <a href="Information" title="Information">information</a>.
</p>
<dl><dt>Examples</dt></dl>
<ul><li><a href="Compiler" title="Compiler">Compiled</a> <a href="Java_class_file" title="Java class file">Java class files</a> (<a href="Java_bytecode" title="Java bytecode">bytecode</a>) and <a href="Mach_(kernel)" title="Mach (kernel)">Mach-O</a> binaries start with hex <code>CA FE BA BE</code>. When compressed with <a href="Pack200" title="Pack200">Pack200</a> the bytes are changed to <code>CA FE D0 0D</code>.</li>
<li><a href="GIF" title="GIF">GIF</a> image files have the <a href="ASCII" title="ASCII">ASCII</a> code for "GIF89a" (<code>47 49 46 38 39 61</code>) or "GIF87a" (<code>47 49 46 38 37 61</code>)</li>
<li><a href="JPEG" title="JPEG">JPEG</a> image files begin with <code>FF D8</code> and end with <code>FF D9</code>. JPEG/<a href="JFIF" class="mw-redirect" title="JFIF">JFIF</a> files contain the <a href="Null-terminated_string" title="Null-terminated string">null terminated string</a> "JFIF" (<code>4A 46 49 46 00</code>). JPEG/<a href="Exif" title="Exif">Exif</a> files contain the <a href="Null-terminated_string" title="Null-terminated string">null terminated string</a> "Exif" (<code>45 78 69 66 00</code>), followed by more <a href="Metadata_(computing)" class="mw-redirect" title="Metadata (computing)">metadata</a> about the file.</li>
<li><a href="PNG" title="PNG">PNG</a> image files begin with an 8-<a href="Byte" title="Byte">byte</a> signature which identifies the file as a PNG file and allows detection of common file transfer problems: "\211PNG\r\n\032\n" (<code>89 50 4E 47 0D 0A 1A 0A</code>). That signature contains various <a href="Newline" title="Newline">newline</a> characters to permit detecting unwarranted automated newline conversions, such as transferring the file using <a href="File_Transfer_Protocol" title="File Transfer Protocol">FTP</a> with the <i>ASCII</i> <a href="File_Transfer_Protocol#Protocol_overview" title="File Transfer Protocol">transfer mode</a> instead of the <i>binary</i> mode.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup></li>
<li>Standard <a href="MIDI" title="MIDI">MIDI</a> audio files have the <a href="ASCII" title="ASCII">ASCII</a> code for "MThd" (<b>M</b>IDI <b>T</b>rack <b>h</b>ea<b>d</b>er, <code>4D 54 68 64</code>) followed by more metadata.</li>
<li><a href="Unix" title="Unix">Unix</a> or <a href="Linux" title="Linux">Linux</a> scripts may start with a <a href="Shebang_(Unix)" title="Shebang (Unix)">shebang</a> ("#!", <code>23 21</code>) followed by the path to an <a href="Interpreter_directive" class="mw-redirect" title="Interpreter directive">interpreter</a>, if the interpreter is likely to be different from the one from which the script was invoked.</li>
<li><a href="Executable_and_Linkable_Format" title="Executable and Linkable Format">ELF</a> executables start with the byte <code>7F</code> followed by "ELF" (<code>7F 45 4C 46</code>).</li>
<li><a href="PostScript" title="PostScript">PostScript</a> files and programs start with "%!" (<code>25 21</code>).</li>
<li><a href="PDF" title="PDF">PDF</a> files start with "%PDF" (hex <code>25 50 44 46</code>).</li>
<li><a href="DOS_MZ_executable" title="DOS MZ executable">DOS MZ executable</a> files and the <a href="EXE" class="mw-redirect" title="EXE">EXE stub</a> of the <a href="Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a> <a href="Portable_Executable" title="Portable Executable">PE</a> (Portable Executable) files start with the characters "MZ" (<code>4D 5A</code>), the initials of the designer of the file format, <a href="Mark_Zbikowski" title="Mark Zbikowski">Mark Zbikowski</a>. The definition allows the uncommon "ZM" (<code>5A 4D</code>) as well for dosZMXP, a non-PE EXE.<sup id="cite_ref-doszmxp_11-0" class="reference"><a href="#cite_note-doszmxp-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup></li>
<li>The <a href="Berkeley_Fast_File_System" class="mw-redirect" title="Berkeley Fast File System">Berkeley Fast File System</a> superblock format is identified as either <code>19 54 01 19</code> or <code>01 19 54</code> depending on version; both represent the birthday of the author, <a href="Marshall_Kirk_McKusick" title="Marshall Kirk McKusick">Marshall Kirk McKusick</a>.</li>
<li>The <a href="Master_Boot_Record" class="mw-redirect" title="Master Boot Record">Master Boot Record</a> of bootable storage devices on almost all <a href="IA-32" title="IA-32">IA-32</a> <a href="IBM_PC_compatible" title="IBM PC compatible">IBM PC compatibles</a> has a code of <code>55 AA</code> as its last two bytes.</li>
<li>Executables for the <a href="Game_Boy" title="Game Boy">Game Boy</a> and <a href="Game_Boy_Advance" title="Game Boy Advance">Game Boy Advance</a> handheld video game systems have a 48-byte or 156-byte magic number, respectively, at a fixed spot in the header. This magic number encodes a bitmap of the <a href="Nintendo" title="Nintendo">Nintendo</a> logo.</li>
<li><a href="Amiga" title="Amiga">Amiga</a> software executable <a href="Amiga_Hunk" title="Amiga Hunk">Hunk</a> files running on Amiga classic <a href="68000" class="mw-redirect" title="68000">68000</a> machines all started with the hexadecimal number $000003f3, nicknamed the "Magic Cookie."</li>
<li>In the Amiga, the only absolute address in the system is hex $0000 0004 (memory location 4), which contains the start location called SysBase, a pointer to exec.library, the so-called <a href="Kernel_(operating_system)" title="Kernel (operating system)">kernel</a> of Amiga.</li>
<li><a href="Preferred_Executable_Format" title="Preferred Executable Format">PEF</a> files, used by the <a href="Classic_Mac_OS" title="Classic Mac OS">classic Mac OS</a> and <a href="BeOS" title="BeOS">BeOS</a> for <a href="PowerPC" title="PowerPC">PowerPC</a> executables, contain the <a href="ASCII" title="ASCII">ASCII</a> code for "Joy!" (<code>4A 6F 79 21</code>) as a prefix.</li>
<li><a href="TIFF" title="TIFF">TIFF</a> files begin with either "II" or "MM" followed by <a href="Answer_to_Life%2C_the_Universe%2C_and_Everything" class="mw-redirect" title="Answer to Life, the Universe, and Everything">42</a> as a two-byte integer in little or big <a href="Endianness" title="Endianness">endian</a> byte ordering. "II" is for Intel, which uses <a href="Endianness" title="Endianness">little endian</a> byte ordering, so the magic number is <code>49 49 2A 00</code>. "MM" is for Motorola, which uses <a href="Endianness" title="Endianness">big endian</a> byte ordering, so the magic number is <code>4D 4D 00 2A</code>.</li>
<li><a href="Unicode" title="Unicode">Unicode</a> text files encoded in <a href="UTF-16" title="UTF-16">UTF-16</a> often start with the <a href="Byte_Order_Mark" class="mw-redirect" title="Byte Order Mark">Byte Order Mark</a> to detect <a href="Endianness" title="Endianness">endianness</a> (<code>FE FF</code> for big endian and <code>FF FE</code> for little endian). And on <a href="Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a>, <a href="UTF-8" title="UTF-8">UTF-8</a> text files often start with the UTF-8 encoding of the same character, <code>EF BB BF</code>.</li>
<li><a href="LLVM" title="LLVM">LLVM</a> Bitcode files start with "BC" (<code>42 43</code>).</li>
<li><a href="Doom_WAD" class="mw-redirect" title="Doom WAD">WAD</a> files start with "IWAD" or "PWAD" (for <i><a href="Doom_(1993_video_game)" title="Doom (1993 video game)">Doom</a></i>), "WAD2" (for <i><a href="Quake_(video_game)" title="Quake (video game)">Quake</a></i>) and "WAD3" (for <i><a href="Half-Life_(video_game)" title="Half-Life (video game)">Half-Life</a></i>).</li>
<li>Microsoft <a href="Compound_File_Binary_Format" title="Compound File Binary Format">Compound File Binary Format</a> (mostly known as one of the older formats of <a href="Microsoft_Office" title="Microsoft Office">Microsoft Office</a> documents) files start with <code>D0 CF 11 E0</code>, which is visually suggestive of the word "DOCFILE0".</li>
<li>Headers in <a href="ZIP_(file_format)" title="ZIP (file format)">ZIP</a> files often show up in text editors as "PK♥♦" (<code>50 4B 03 04</code>), where "PK" are the initials of <a href="Phil_Katz" title="Phil Katz">Phil Katz</a>, author of <a href="DOS" title="DOS">DOS</a> compression utility <a href="PKZIP" title="PKZIP">PKZIP</a>.</li>
<li>Headers in <a href="7z" title="7z">7z</a> files begin with "7z" (full magic number: <code>37 7A BC AF 27 1C</code>).</li></ul>
<dl><dt>Detection</dt></dl>
<p>The Unix utility program <code><a href="File_(command)" title="File (command)">file</a></code> can read and interpret magic numbers from files, and the file which is used to parse the information is called <i>magic</i>. The Windows utility TrID has a similar purpose.
</p>
<div class="mw-heading mw-heading3"><h3 id="In_protocols">In protocols </h3></div>
<dl><dt>Examples</dt></dl>
<ul><li>The <a href="OSCAR_protocol" title="OSCAR protocol">OSCAR protocol</a>, used in <a href="AOL_Instant_Messenger" class="mw-redirect" title="AOL Instant Messenger">AIM</a>/<a href="ICQ" title="ICQ">ICQ</a>, prefixes requests with <code>2A</code>.</li>
<li>In the <a href="RFB_protocol" class="mw-redirect" title="RFB protocol">RFB protocol</a> used by <a href="VNC" title="VNC">VNC</a>, a client starts its conversation with a server by sending "RFB" (<code>52 46 42</code>, for "Remote Frame Buffer") followed by the client's protocol version number.</li>
<li>In the <a href="Server_Message_Block" title="Server Message Block">SMB</a> protocol used by Microsoft Windows, each SMB request or server reply begins with <code>FF 53 4D 42</code>, or <code>\xFFSMB</code> at the start of the SMB request.</li>
<li>In the <a href="MSRPC" class="mw-redirect" title="MSRPC">MSRPC</a> protocol used by Microsoft Windows, each TCP-based request begins with <code>05</code> at the start of the request (representing Microsoft DCE/RPC Version 5), followed immediately by a <code>00</code> or <code>01</code> for the minor version. In UDP-based MSRPC requests the first byte is always <code>04</code>.</li>
<li>In <a href="Component_Object_Model" title="Component Object Model">COM</a> and <a href="Distributed_Component_Object_Model" title="Distributed Component Object Model">DCOM</a> marshalled interfaces, called <a href="OBJREF" title="OBJREF">OBJREFs</a>, always start with the byte sequence "MEOW" (<code>4D 45 4F 57</code>). Debugging extensions (used for DCOM channel hooking) are prefaced with the byte sequence "MARB" (<code>4D 41 52 42</code>).</li>
<li>Unencrypted <a href="BitTorrent_tracker" title="BitTorrent tracker">BitTorrent tracker</a> requests begin with a single byte containing the value <code>19</code> representing the header length, followed immediately by the phrase "BitTorrent protocol" at byte position 1.</li>
<li><a href="EDonkey2000" title="EDonkey2000">eDonkey2000</a>/<a href="EMule" title="EMule">eMule</a> traffic begins with a single byte representing the client version. Currently <code>E3</code> represents an eDonkey client, <code>C5</code> represents eMule, and <code>D4</code> represents compressed eMule.</li>
<li>The first 4 bytes of a block in the <a href="Bitcoin" title="Bitcoin">Bitcoin</a> Blockchain contains a magic number which serves as the network identifier. The value is <code>D9 B4 BE F9</code>, which indicates the main network, while <code>DA B5 BF FA</code> indicates the testnet.</li>
<li><a href="Secure_Sockets_Layer" class="mw-redirect" title="Secure Sockets Layer">SSL</a> transactions always begin with a "client hello" message. The record encapsulation scheme used to prefix all SSL packets consists of two- and three- byte header forms. Typically an SSL version 2 client hello message is prefixed with an <code>80</code> and an SSLv3 server response to a client hello begins with <code>16</code> (though this may vary).</li>
<li><a href="DHCP" class="mw-redirect" title="DHCP">DHCP</a> packets use a "magic cookie" value of <code>63 82 53 63</code> at the start of the options section of the packet. This value is included in all DHCP packet types.</li>
<li><a href="HTTP/2" title="HTTP/2">HTTP/2</a> connections start with the 24-character string <code>PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n</code>. It is designed to avoid the processing of frames by servers and intermediaries which support earlier versions of HTTP but not 2.0.</li>
<li>The <a href="WebSocket#Opening_handshake" title="WebSocket">WebSocket opening handshake</a> uses a string containing the <a href="UUIDv4" class="mw-redirect" title="UUIDv4">UUIDv4</a> <code>258EAFA5-E914-47DA-95CA-C5AB0DC85B11</code>.</li></ul>
<div class="mw-heading mw-heading3"><h3 id="In_interfaces">In interfaces </h3></div>
<p>Magic numbers are common in <a href="API_function" class="mw-redirect" title="API function">API functions</a> and <a href="Interface_(computing)" title="Interface (computing)">interfaces</a> across many <a href="Operating_system" title="Operating system">operating systems</a>, including <a href="DOS" title="DOS">DOS</a>, <a href="Windows" class="mw-redirect" title="Windows">Windows</a> and <a href="NetWare" title="NetWare">NetWare</a>:
</p>
<dl><dt>Examples</dt></dl>
<ul><li><a href="IBM_PC" class="mw-redirect" title="IBM PC">IBM PC</a>-compatible <a href="BIOS" title="BIOS">BIOSes</a> use magic values <code>00 00</code> and <code>12 34</code> to decide if the system should count up memory or not on reboot, thereby performing a cold or a warm boot. Theses values are also used by <a href="EMM386" title="EMM386">EMM386</a> memory managers intercepting boot requests.<sup id="cite_ref-Paul_2002_MAGIC_12-0" class="reference"><a href="#cite_note-Paul_2002_MAGIC-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> BIOSes also use magic values <code>55 AA</code> to determine if a disk is bootable.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup></li>
<li>The <a href="MS-DOS" title="MS-DOS">MS-DOS</a> disk cache <a href="SMARTDRV" class="mw-redirect" title="SMARTDRV">SMARTDRV</a> (codenamed "Bambi") uses magic values <code>BA BE</code> and <code>EB AB</code> in API functions.<sup id="cite_ref-Paul_2002_MAGIC_12-1" class="reference"><a href="#cite_note-Paul_2002_MAGIC-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup></li>
<li>Many <a href="DR-DOS" title="DR-DOS">DR-DOS</a>, <a href="Novell_DOS" class="mw-redirect" title="Novell DOS">Novell DOS</a> and <a href="OpenDOS" class="mw-redirect" title="OpenDOS">OpenDOS</a> drivers developed in the former <i>European Development Centre</i> in the UK use the value <code>0E DC</code> as magic token when invoking or providing additional functionality sitting on top of the (emulated) standard DOS functions, NWCACHE being one example.<sup id="cite_ref-Paul_2002_MAGIC_12-2" class="reference"><a href="#cite_note-Paul_2002_MAGIC-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup></li></ul>
<div class="mw-heading mw-heading3"><h3 id="Other_uses">Other uses </h3></div>
<dl><dt>Examples</dt></dl>
<ul><li>The default <a href="MAC_address" title="MAC address">MAC address</a> on Texas Instruments <a href="System_on_a_chip" title="System on a chip">SOCs</a> is <code>DE:AD:BE:EF:00:00</code>.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup></li></ul>
<div class="mw-heading mw-heading2"><h2 id="Data_type_limits">Data type limits</h2></div>
<p>This is a list of limits of data storage types:<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup>
</p>
<table class="wikitable">
<tbody><tr>
<th>Decimal
</th>
<th>Hex
</th>
<th>Description
</th></tr>
<tr>
<td><a href="18%2C446%2C744%2C073%2C709%2C551%2C615" class="mw-redirect" title="18,446,744,073,709,551,615">18,446,744,073,709,551,615</a>
</td>
<td>FFFF<span style="white-space: nowrap;"> </span>FFFF<span style="white-space: nowrap;"> </span>FFFF<span style="white-space: nowrap;"> </span>FFFF
</td>
<td>The maximum unsigned 64 bit value (2<sup>64</sup> − 1)
</td></tr>
<tr>
<td><a href="9%2C223%2C372%2C036%2C854%2C775%2C807" class="mw-redirect" title="9,223,372,036,854,775,807">9,223,372,036,854,775,807</a>
</td>
<td>7FFF<span style="white-space: nowrap;"> </span>FFFF<span style="white-space: nowrap;"> </span>FFFF<span style="white-space: nowrap;"> </span>FFFF
</td>
<td>The maximum signed 64 bit value (2<sup>63</sup> − 1)
</td></tr>
<tr>
<td><a href="9%2C007%2C199%2C254%2C740%2C992" class="mw-redirect" title="9,007,199,254,740,992">9,007,199,254,740,992</a>
</td>
<td>0020<span style="white-space: nowrap;"> </span>0000<span style="white-space: nowrap;"> </span>0000<span style="white-space: nowrap;"> </span>0000
</td>
<td>The largest consecutive integer in <a href="Double-precision_floating-point_format" title="Double-precision floating-point format">IEEE 754 double precision</a> (2<sup>53</sup>)
</td></tr>
<tr>
<td><a href="4%2C294%2C967%2C295" title="4,294,967,295">4,294,967,295</a>
</td>
<td>FFFF<span style="white-space: nowrap;"> </span>FFFF
</td>
<td>The maximum unsigned 32 bit value (2<sup>32</sup> − 1)
</td></tr>
<tr>
<td><a href="2%2C147%2C483%2C647" title="2,147,483,647">2,147,483,647</a>
</td>
<td>7FFF<span style="white-space: nowrap;"> </span>FFFF
</td>
<td>The maximum signed 32 bit value (2<sup>31</sup> − 1)
</td></tr>
<tr>
<td><a href="16%2C777%2C216" class="mw-redirect" title="16,777,216">16,777,216</a>
</td>
<td>0100<span style="white-space: nowrap;"> </span>0000
</td>
<td>The largest consecutive integer in <a href="Single-precision_floating-point_format" title="Single-precision floating-point format">IEEE 754 single precision</a> (2<sup>24</sup>)
</td></tr>
<tr>
<td><a href="65%2C535" title="65,535">65,535</a>
</td>
<td>FFFF
</td>
<td>The maximum unsigned 16 bit value (2<sup>16</sup> − 1)
</td></tr>
<tr>
<td>32,767
</td>
<td>7FFF
</td>
<td>The maximum signed 16 bit value (2<sup>15</sup> − 1)
</td></tr>
<tr>
<td><a href="255_(number)" title="255 (number)">255</a>
</td>
<td>FF
</td>
<td>The maximum unsigned 8 bit value (2<sup>8</sup> − 1)
</td></tr>
<tr>
<td>127
</td>
<td>7F
</td>
<td>The maximum signed 8 bit value (2<sup>7</sup> − 1)
</td></tr>
<tr>
<td>−128
</td>
<td>80
</td>
<td>Minimum signed 8 bit value
</td></tr>
<tr>
<td>−32,768
</td>
<td>8000
</td>
<td>Minimum signed 16 bit value
</td></tr>
<tr>
<td>−2,147,483,648
</td>
<td>8000<span style="white-space: nowrap;"> </span>0000
</td>
<td>Minimum signed 32 bit value
</td></tr>
<tr>
<td>−9,223,372,036,854,775,808
</td>
<td>8000<span style="white-space: nowrap;"> </span>0000<span style="white-space: nowrap;"> </span>0000<span style="white-space: nowrap;"> </span>0000
</td>
<td>Minimum signed 64 bit value
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="GUIDs">GUIDs </h2></div>
<p>It is possible to create or alter <a href="Globally_unique_identifier" class="mw-redirect" title="Globally unique identifier">globally unique identifiers</a> (GUIDs) so that they are memorable, but this is highly discouraged as it compromises their strength as near-unique identifiers.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup> The specifications for generating GUIDs and UUIDs are quite complex, which is what leads to them being virtually unique, if properly implemented.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup>
</p><p>Microsoft Windows product ID numbers for <a href="Microsoft_Office" title="Microsoft Office">Microsoft Office</a> products sometimes end with <code>0000-0000-0000000FF1CE</code> ("OFFICE"), such as <code>90160000-008C-0000-0000-0000000FF1CE</code>, the product ID for the "Office 16 Click-to-Run Extensibility Component".
</p><p>Java uses several GUIDs starting with <code>CAFEEFAC</code>.<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup>
</p><p>In the <a href="GUID_Partition_Table" title="GUID Partition Table">GUID Partition Table</a> of the GPT partitioning scheme, <a href="BIOS_Boot_partition" class="mw-redirect" title="BIOS Boot partition">BIOS Boot partitions</a> use the special GUID <code>21686148-6449-6E6F-744E-656564454649</code><sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup> which does not follow the GUID definition; instead, it is formed by using the <a href="ASCII" title="ASCII">ASCII</a> codes for the string <code>Hah!IdontNeedEFI</code> partially in <a href="Little_endian" class="mw-redirect" title="Little endian">little endian</a> order.<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Debug_values">Debug values </h2></div>
<p><b>Magic debug values</b> are specific values written to <a href="Random-access_memory" title="Random-access memory">memory</a> during <a href="Memory_allocation" class="mw-redirect" title="Memory allocation">allocation</a> or deallocation, so that it will later be possible to tell whether or not they have become corrupted, and to make it obvious when values taken from uninitialized memory are being used. Memory is usually viewed in hexadecimal, so memorable repeating or <a href="Hexspeak" title="Hexspeak">hexspeak</a> values are common. Numerically odd values may be preferred so that processors without byte addressing will fault when attempting to use them as pointers (which must fall at even addresses). Values should be chosen that are away from likely addresses (the program code, static data, heap data, or the stack). Similarly, they may be chosen so that they are not valid codes in the instruction set for the given architecture.
</p><p>Since it is very unlikely, although possible, that a 32-bit integer would take this specific value, the appearance of such a number in a <a href="Debugger" title="Debugger">debugger</a> or <a href="Memory_dump" class="mw-redirect" title="Memory dump">memory dump</a> most likely indicates an error such as a buffer overflow or an <a href="Uninitialized_variable" title="Uninitialized variable">uninitialized variable</a>.
</p><p>Famous and common examples include:
</p>
<table class="wikitable">
<tbody><tr>
<th style="background:#D0E0FF">Code
</th>
<th style="background:#D0E0FF">Description
</th></tr>
<tr>
<td><code>00008123</code></td>
<td>Used in MS Visual C++. Deleted pointers are set to this value, so they throw an exception, when they are used after; it is a more recognizable alias for the zero address. It is activated with the Security Development Lifecycle (/sdl) option.<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>..FACADE</code></td>
<td><i>"Facade"</i>, Used by a number of <a href="Real-time_operating_system" title="Real-time operating system">RTOSes</a>.
</td></tr>
<tr>
<td><code>1BADB002</code></td>
<td><i>"1 bad boot"</i>, <a href="Multiboot_Specification" class="mw-redirect" title="Multiboot Specification">Multiboot</a> header magic number.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>8BADF00D</code></td>
<td><i>"Ate bad food"</i>, Indicates that an <a href="Apple_Inc." title="Apple Inc.">Apple</a> <a href="IOS" title="IOS">iOS</a> application has been terminated because a watchdog timeout occurred.<sup id="cite_ref-developer.apple.com_24-0" class="reference"><a href="#cite_note-developer.apple.com-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>A5A5A5A5</code></td>
<td>Used in embedded development because the alternating bit pattern (1010 0101) creates an easily recognized pattern on <a href="Oscilloscope" title="Oscilloscope">oscilloscopes</a> and <a href="Logic_analyzer" title="Logic analyzer">logic analyzers</a>.
</td></tr>
<tr>
<td><code>A5</code></td>
<td>Used in <a href="FreeBSD" title="FreeBSD">FreeBSD</a>'s PHK <a href="Malloc" class="mw-redirect" title="Malloc">malloc(3)</a> for debugging when /etc/malloc.conf is symlinked to "-J" to initialize all newly allocated memory as this value is not a NULL pointer or ASCII NUL character.
</td></tr>
<tr>
<td><code>ABABABAB</code></td>
<td>Used by <a href="Microsoft" title="Microsoft">Microsoft</a>'s debug HeapAlloc() to mark "no man's land" <a href="Guard_byte" title="Guard byte">guard bytes</a> after allocated heap memory.<sup id="cite_ref-Win32CRTDebugHeapInternals_25-0" class="reference"><a href="#cite_note-Win32CRTDebugHeapInternals-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>ABADBABE</code></td>
<td><i>"A bad babe"</i>, Used by <a href="Apple_Inc." title="Apple Inc.">Apple</a> as the "Boot Zero Block" magic number.
</td></tr>
<tr>
<td><code>ABBABABE</code></td>
<td><i>"<a href="ABBA" title="ABBA">ABBA</a> babe"</i>, used by <i><a href="Driver%3A_Parallel_Lines" title="Driver: Parallel Lines">Driver: Parallel Lines</a></i> memory heap.
</td></tr>
<tr>
<td><code>ABADCAFE</code></td>
<td><i>"A bad cafe"</i>, Used to initialize all unallocated memory (Mungwall, <a href="AmigaOS" title="AmigaOS">AmigaOS</a>).
</td></tr>
<tr>
<td><code>B16B00B5</code></td>
<td><i>"Big Boobs"</i>, Formerly required by <a href="Microsoft" title="Microsoft">Microsoft</a>'s <a href="Hyper-V" title="Hyper-V">Hyper-V</a> hypervisor to be used by Linux guests as the upper half of their "guest id".<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>BAADF00D</code></td>
<td><i>"Bad food"</i>, Used by <a href="Microsoft" title="Microsoft">Microsoft</a>'s debug HeapAlloc() to mark uninitialized allocated heap memory.<sup id="cite_ref-Win32CRTDebugHeapInternals_25-1" class="reference"><a href="#cite_note-Win32CRTDebugHeapInternals-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>BAAAAAAD</code></td>
<td><i>"Baaaaaad"</i>, Indicates that the <a href="Apple_Inc." title="Apple Inc.">Apple</a> <a href="IOS" title="IOS">iOS</a> log is a stackshot of the entire system, not a crash report.<sup id="cite_ref-developer.apple.com_24-1" class="reference"><a href="#cite_note-developer.apple.com-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>BAD22222</code></td>
<td><i>"Bad too repeatedly"</i>, Indicates that an <a href="Apple_Inc." title="Apple Inc.">Apple</a> <a href="IOS" title="IOS">iOS</a> VoIP application has been terminated because it resumed too frequently.<sup id="cite_ref-developer.apple.com_24-2" class="reference"><a href="#cite_note-developer.apple.com-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>BADBADBADBAD</code></td>
<td><i>"Bad bad bad bad"</i>, <a href="Burroughs_large_systems" class="mw-redirect" title="Burroughs large systems">Burroughs large systems</a> "uninitialized" memory (48-bit words).
</td></tr>
<tr>
<td><code>BADC0FFEE0DDF00D</code></td>
<td><i>"Bad coffee odd food"</i>, Used on <a href="IBM" title="IBM">IBM</a> <a href="RS/6000" class="mw-redirect" title="RS/6000">RS/6000</a> 64-bit systems to indicate uninitialized CPU registers.
</td></tr>
<tr>
<td><code>BADDCAFE</code></td>
<td><i>"Bad cafe"</i>, On <a href="Sun_Microsystems" title="Sun Microsystems">Sun Microsystems</a>' <a href="Solaris_(operating_system)" class="mw-redirect" title="Solaris (operating system)">Solaris</a>, marks uninitialized kernel memory (KMEM_UNINITIALIZED_PATTERN).
</td></tr>
<tr>
<td><code>BBADBEEF</code></td>
<td><i>"Bad beef"</i>, Used in <a href="WebKit" title="WebKit">WebKit</a>, for particularly unrecoverable errors.<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>BEBEBEBE</code></td>
<td>Used by <a href="AddressSanitizer" class="mw-redirect" title="AddressSanitizer">AddressSanitizer</a> to fill allocated but not initialized memory.<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>BEEFCACE</code></td>
<td><i>"Beef cake"</i>, Used by <a href="Microsoft_.NET" class="mw-redirect" title="Microsoft .NET">Microsoft .NET</a> as a magic number in resource files.
</td></tr>
<tr>
<td><code>C00010FF</code></td>
<td><i>"Cool off"</i>, Indicates <a href="Apple_Inc." title="Apple Inc.">Apple</a> <a href="IOS" title="IOS">iOS</a> app was killed by the operating system in response to a thermal event.<sup id="cite_ref-developer.apple.com_24-3" class="reference"><a href="#cite_note-developer.apple.com-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>CAFEBABE</code></td>
<td><i>"Cafe babe"</i>, Used by <a href="Java_(programming_language)" title="Java (programming language)">Java</a> for class files.
</td></tr>
<tr>
<td><code>CAFED00D</code></td>
<td><i>"Cafe dude"</i>, Used by <a href="Java_(programming_language)" title="Java (programming language)">Java</a> for their <a href="Pack200" title="Pack200">pack200</a> compression.
</td></tr>
<tr>
<td><code>CAFEFEED</code></td>
<td><i>"Cafe feed"</i>, Used by <a href="Sun_Microsystems" title="Sun Microsystems">Sun Microsystems</a>' <a href="Solaris_(operating_system)" class="mw-redirect" title="Solaris (operating system)">Solaris</a> debugging kernel to mark kmemfree() memory.
</td></tr>
<tr>
<td><code>CCCCCCCC</code></td>
<td>Used by <a href="Microsoft" title="Microsoft">Microsoft</a>'s C++ debugging runtime library and many DOS environments to mark uninitialized <a href="Stack-based_memory_allocation" title="Stack-based memory allocation">stack</a> memory. <code>CC</code> is the opcode of the <a href="INT_3" class="mw-redirect" title="INT 3">INT 3</a> debug breakpoint interrupt on x86 processors.<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>CDCDCDCD</code></td>
<td>Used by <a href="Microsoft" title="Microsoft">Microsoft</a>'s C/C++ debug malloc() function to mark uninitialized heap memory, usually returned from <code>HeapAlloc</code>.<sup id="cite_ref-Win32CRTDebugHeapInternals_25-2" class="reference"><a href="#cite_note-Win32CRTDebugHeapInternals-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>0D15EA5E</code></td>
<td><i>"Zero Disease"</i>, Used as a flag to indicate regular boot on the <a href="GameCube" title="GameCube">GameCube</a> and <a href="Wii" title="Wii">Wii</a> consoles.
</td></tr>
<tr>
<td><code>DDDDDDDD</code></td>
<td>Used by MicroQuill's SmartHeap and Microsoft's C/C++ debug free() function to mark freed heap memory.<sup id="cite_ref-Win32CRTDebugHeapInternals_25-3" class="reference"><a href="#cite_note-Win32CRTDebugHeapInternals-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>DEAD10CC</code></td>
<td><i>"Dead lock"</i>, Indicates that an <a href="Apple_Inc." title="Apple Inc.">Apple</a> <a href="IOS" title="IOS">iOS</a> application has been terminated because it held on to a system resource while running in the background.<sup id="cite_ref-developer.apple.com_24-4" class="reference"><a href="#cite_note-developer.apple.com-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>DEADBABE</code></td>
<td><i>"Dead babe"</i>, Used at the start of <a href="Silicon_Graphics" title="Silicon Graphics">Silicon Graphics</a>' <a href="IRIX" title="IRIX">IRIX</a> arena files.
</td></tr>
<tr id="DEADBEEF">
<td><code>DEADBEEF</code></td>
<td><i>"Dead beef"</i>, Famously used on <a href="IBM" title="IBM">IBM</a> systems such as the <a href="RS/6000" class="mw-redirect" title="RS/6000">RS/6000</a>, also used in the <a href="Classic_Mac_OS" title="Classic Mac OS">classic Mac OS</a> <a href="Operating_system" title="Operating system">operating systems</a>, <a href="OPENSTEP_Enterprise" class="mw-redirect" title="OPENSTEP Enterprise">OPENSTEP Enterprise</a>, and the <a href="Commodore_International" title="Commodore International">Commodore</a> <a href="Amiga" title="Amiga">Amiga</a>. On <a href="Sun_Microsystems" title="Sun Microsystems">Sun Microsystems</a>' <a href="Solaris_(operating_system)" class="mw-redirect" title="Solaris (operating system)">Solaris</a>, marks freed kernel memory (KMEM_FREE_PATTERN).
</td></tr>
<tr>
<td><code>DEADCAFE</code></td>
<td><i>"Dead cafe"</i>, Used by <a href="Microsoft_.NET" class="mw-redirect" title="Microsoft .NET">Microsoft .NET</a> as an error number in <a href="Dynamic-link_library" title="Dynamic-link library">DLLs</a>.
</td></tr>
<tr>
<td><code>DEADC0DE</code></td>
<td><i>"Dead code"</i>, Used as a marker in <a href="OpenWRT" class="mw-redirect" title="OpenWRT">OpenWRT</a> firmware to signify the beginning of the to-be created jffs2 file system at the end of the static firmware.
</td></tr>
<tr>
<td><code>DEADFA11</code></td>
<td><i>"Dead fail"</i>, Indicates that an <a href="Apple_Inc." title="Apple Inc.">Apple</a> <a href="IOS" title="IOS">iOS</a> application has been force quit by the user.<sup id="cite_ref-developer.apple.com_24-5" class="reference"><a href="#cite_note-developer.apple.com-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>DEADF00D</code></td>
<td><i>"Dead food"</i>, Used by Mungwall on the <a href="Commodore_International" title="Commodore International">Commodore</a> <a href="Amiga" title="Amiga">Amiga</a> to mark allocated but uninitialized memory.<sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>DEFEC8ED</code></td>
<td><i>"Defecated"</i>, Used for <a href="OpenSolaris" title="OpenSolaris">OpenSolaris</a> <a href="Core_dump" title="Core dump">core dumps</a>.
</td></tr>
<tr>
<td><code>DEADDEAD</code></td>
<td><i>"Dead Dead"</i> indicates that the user deliberately initiated a crash dump from either the kernel debugger or the keyboard under Microsoft Windows.<sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>D00D2BAD</code>
</td>
<td><i>"Dude, Too Bad",</i> Used by Safari crashes on macOS Big Sur.<sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>D00DF33D</code>
</td>
<td><i>"Dude feed",</i> Used by the <a href="Devicetree" title="Devicetree">devicetree</a> to mark the start of headers.<sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>EBEBEBEB</code></td>
<td>From MicroQuill's SmartHeap.
</td></tr>
<tr>
<td><code>FADEDEAD</code></td>
<td><i>"Fade dead"</i>, Comes at the end to identify every <a href="AppleScript" title="AppleScript">AppleScript</a> script.
</td></tr>
<tr>
<td><code>FDFDFDFD</code></td>
<td>Used by <a href="Microsoft" title="Microsoft">Microsoft</a>'s C/C++ debug malloc() function to mark "no man's land" <a href="Guard_byte" title="Guard byte">guard bytes</a> before and after allocated heap memory,<sup id="cite_ref-Win32CRTDebugHeapInternals_25-4" class="reference"><a href="#cite_note-Win32CRTDebugHeapInternals-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup> and some debug Secure <a href="C_standard_library" title="C standard library">C-Runtime</a> functions implemented by Microsoft (e.g. strncat_s).<sup id="cite_ref-34" class="reference"><a href="#cite_note-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><code>FEE1DEAD</code></td>
<td><i>"Feel dead"</i>, Used by <a href="Linux" title="Linux">Linux</a> reboot() syscall.
</td></tr>
<tr>
<td><code>FEEDFACE</code></td>
<td><i>"Feed face"</i>, Seen in PowerPC <a href="Mach-O" title="Mach-O">Mach-O</a> binaries on <a href="Apple_Inc." title="Apple Inc.">Apple Inc.</a>'s Mac OSX platform. On <a href="Sun_Microsystems" title="Sun Microsystems">Sun Microsystems</a>' <a href="Solaris_(operating_system)" class="mw-redirect" title="Solaris (operating system)">Solaris</a>, marks the red zone (KMEM_REDZONE_PATTERN).
<p>Used by <a href="VLC_player" class="mw-redirect" title="VLC player">VLC player</a> and some <a href="IP_camera" title="IP camera">IP cameras</a> in <a href="Real-time_Transport_Protocol" title="Real-time Transport Protocol">RTP</a>/<a href="RTCP" class="mw-redirect" title="RTCP">RTCP</a> protocol, VLC player sends four bytes in the order of the <a href="Endianness" title="Endianness">endianness</a> of the system. Some IP cameras expect the player to send this magic number and do not start the stream if it is not received.
</p>
</td></tr>
<tr>
<td><code>FEEEFEEE</code></td>
<td><i>"Fee fee"</i>, Used by <a href="Microsoft" title="Microsoft">Microsoft</a>'s debug HeapFree() to mark freed heap memory. Some nearby internal bookkeeping values may have the high word set to FEEE as well.<sup id="cite_ref-Win32CRTDebugHeapInternals_25-5" class="reference"><a href="#cite_note-Win32CRTDebugHeapInternals-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>
</td></tr></tbody></table>
<p>Most of these are 32 <a href="Bit" title="Bit">bits</a> long – the <a href="Word_size" class="mw-redirect" title="Word size">word size</a> of most 32-bit architecture computers.
</p><p>The prevalence of these values in Microsoft technology is no coincidence; they are discussed in detail in <a href="Steve_Maguire" title="Steve Maguire">Steve Maguire</a>'s book <i>Writing Solid Code</i> from <a href="Microsoft_Press" title="Microsoft Press">Microsoft Press</a>. He gives a variety of criteria for these values, such as:
</p>
<ul><li>They should not be useful; that is, most algorithms that operate on them should be expected to do something unusual. Numbers like zero don't fit this criterion.</li>
<li>They should be easily recognized by the programmer as invalid values in the debugger.</li>
<li>On machines that don't have <a href="Byte_alignment" class="mw-redirect" title="Byte alignment">byte alignment</a>, they should be <a href="Odd_number" class="mw-redirect" title="Odd number">odd numbers</a>, so that dereferencing them as addresses causes an exception.</li>
<li>They should cause an exception, or perhaps even a debugger break, if executed as code.</li></ul>
<p>Since they were often used to mark areas of memory that were essentially empty, some of these terms came to be used in phrases meaning "gone, aborted, flushed from memory"; e.g. "Your program is DEADBEEF".
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Magic_string" title="Magic string">Magic string</a></li>
<li><a href="File_format#Magic_number" title="File format">File format § Magic number</a></li>
<li><a href="List_of_file_signatures" title="List of file signatures">List of file signatures</a></li>
<li><a href="FourCC" title="FourCC">FourCC</a></li>
<li><a href="Hard_coding" title="Hard coding">Hard coding</a></li>
<li><a href="Magic_(programming)" title="Magic (programming)">Magic (programming)</a></li>
<li><a href="NaN" title="NaN">NaN</a> (Not a Number)</li>
<li><a href="Enumerated_type" title="Enumerated type">Enumerated type</a></li>
<li><a href="Hexspeak" title="Hexspeak">Hexspeak</a>, for another list of magic values</li>
<li><a href="Nothing_up_my_sleeve_number" class="mw-redirect" title="Nothing up my sleeve number">Nothing up my sleeve number</a> about magic constants in <a href="Cryptography" title="Cryptography">cryptographic</a> algorithms</li>
<li><a href="Time_formatting_and_storage_bugs" title="Time formatting and storage bugs">Time formatting and storage bugs</a>, for problems that can be caused by magics</li>
<li><a href="Sentinel_value" title="Sentinel value">Sentinel value</a> (aka flag value, trip value, rogue value, signal value, dummy data)</li>
<li><a href="Canary_value" class="mw-redirect" title="Canary value">Canary value</a>, special value to detect buffer overflows</li>
<li><a href="XYZZY_(magic_word)" class="mw-redirect" title="XYZZY (magic word)">XYZZY (magic word)</a></li>
<li><a href="Fast_inverse_square_root" title="Fast inverse square root">Fast inverse square root</a>, an algorithm that uses the constant 0x5F3759DF</li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-MartinG25-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-MartinG25_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-MartinG25_1-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-MartinG25_1-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFMartin2009" class="citation book cs1">Martin, Robert C. (2009). "Chapter 17: Smells and Heuristics - G25 Replace Magic Numbers with Named Constants". <span class="id-lock-limited" title="Free access subject to limited trial, subscription normally required"><a rel="nofollow" class="external text" href="https://archive.org/details/cleancodehandboo00mart_843"><i>Clean Code - A handbook of agile software craftsmanship</i></a></span>. Boston: Prentice Hall. p. <a rel="nofollow" class="external text" href="https://archive.org/details/cleancodehandboo00mart_843/page/n330">300</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-13-235088-4</bdi>.</cite></span>
</li>
<li id="cite_note-MartinG16-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-MartinG16_2-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFMartin2009" class="citation book cs1">Martin, Robert C. (2009). "Chapter 17: Smells and Heuristics - G16 Obscured Intent". <span class="id-lock-limited" title="Free access subject to limited trial, subscription normally required"><a rel="nofollow" class="external text" href="https://archive.org/details/cleancodehandboo00mart_843"><i>Clean Code - A handbook of agile software craftsmanship</i></a></span>. Boston: Prentice Hall. p. <a rel="nofollow" class="external text" href="https://archive.org/details/cleancodehandboo00mart_843/page/n325">295</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-13-235088-4</bdi>.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite id="CITEREFMaguire2008" class="citation web cs1">Maguire, James (2008-12-09). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180623112852/http://www.datamation.com/columns/article.php/3789981/Bjarne-Stroustrup-on-Educating-Software-Developers.htm">"Bjarne Stroustrup on Educating Software Developers"</a>. <i>Datamation.com</i>. Archived from <a rel="nofollow" class="external text" href="http://www.datamation.com/columns/article.php/3789981/Bjarne-Stroustrup-on-Educating-Software-Developers.htm">the original</a> on 2018-06-23.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite id="CITEREFVogel2007" class="citation web cs1">Vogel, Jeff (2007-05-29). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180926205449/https://www.ibm.com/developerworks/linux/library/l-clear-code/?ca=dgr-FClnxw01linuxcodetips">"Six ways to write more comprehensible code"</a>. <i>IBM Developer</i>. Archived from <a rel="nofollow" class="external text" href="http://www.ibm.com/developerworks/linux/library/l-clear-code/?ca=dgr-FClnxw01linuxcodetips">the original</a> on 2018-09-26.</cite></span>
</li>
<li id="cite_note-Paul_2002_SYMBOLS-5"><span class="mw-cite-backlink">^ <a href="#cite_ref-Paul_2002_SYMBOLS_5-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Paul_2002_SYMBOLS_5-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Paul_2002_SYMBOLS_5-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Paul_2002_SYMBOLS_5-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Paul_2002_SYMBOLS_5-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-Paul_2002_SYMBOLS_5-5"><sup><i><b>f</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFPaul2002" class="citation web cs1">Paul, Matthias R. (2002-04-09). <a rel="nofollow" class="external text" href="https://marc.info/?l=freedos-dev&m=101832534205646&w=2">"[fd-dev] CuteMouse 2.0 alpha 1"</a>. <i>freedos-dev</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20220407144249/https://marc.info/?l=freedos-dev&m=101832534205646&w=2">Archived</a> from the original on 2022-04-07<span class="reference-accessdate">. Retrieved <span class="nowrap">2022-08-04</span></span>.</cite></span>
</li>
<li id="cite_note-dmr-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-dmr_6-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20061104034450/http://cm.bell-labs.com/cm/cs/who/dmr/odd.html">"Odd Comments and Strange Doings in Unix"</a>. <i><a href="Bell_Labs" title="Bell Labs">Bell Labs</a></i>. 2002-06-22. Archived from <a rel="nofollow" class="external text" href="http://cm.bell-labs.com/cm/cs/who/dmr/odd.html">the original</a> on 2006-11-04.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text">Personal communication with Dennis M. Ritchie.</span>
</li>
<li id="cite_note-V6sys1-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-V6sys1_8-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/sys/ken/sys1.c">"The Unix Tree V6/usr/sys/ken/sys1.c"</a>. <i><a href="The_Unix_Heritage_Society" class="mw-redirect" title="The Unix Heritage Society">The Unix Heritage Society</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20230326024616/https://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/sys/ken/sys1.c">Archived</a> from the original on 2023-03-26.</cite></span>
</li>
<li id="cite_note-V7sys1-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-V7sys1_9-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/sys/sys/sys1.c">"The Unix Tree V7/usr/sys/sys/sys1.c"</a>. <i><a href="The_Unix_Heritage_Society" class="mw-redirect" title="The Unix Heritage Society">The Unix Heritage Society</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20230326024632/https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/sys/sys/sys1.c">Archived</a> from the original on 2023-03-26.</cite></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.libpng.org/pub/png/spec/1.0/PNG-Rationale.html#R.PNG-file-signature">"PNG (Portable Network Graphics) Specification Version 1.0: 12.11. PNG file signature"</a>. <i>MIT</i>. 1996-10-01. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20230326024630/http://www.libpng.org/pub/png/spec/1.0/PNG-Rationale.html#R.PNG-file-signature">Archived</a> from the original on 2023-03-26.</cite></span>
</li>
<li id="cite_note-doszmxp-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-doszmxp_11-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFChen2008" class="citation web cs1">Chen, Raymond (2008-03-24). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20190218083526/https://blogs.msdn.microsoft.com/oldnewthing/20080324-00/?p=23033">"What's the difference between the COM and EXE extensions?"</a>. <i>The Old New Thing</i>. Archived from <a rel="nofollow" class="external text" href="https://blogs.msdn.microsoft.com/oldnewthing/20080324-00/?p=23033">the original</a> on 2019-02-18.</cite></span>
</li>
<li id="cite_note-Paul_2002_MAGIC-12"><span class="mw-cite-backlink">^ <a href="#cite_ref-Paul_2002_MAGIC_12-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Paul_2002_MAGIC_12-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Paul_2002_MAGIC_12-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFPaul2002" class="citation web cs1">Paul, Matthias R. (2002-04-03). <a rel="nofollow" class="external text" href="https://marc.info/?l=freedos-dev&m=101783474625117">"[fd-dev] Ctrl+Alt+Del"</a>. <i>freedos-dev</i>. <a rel="nofollow" class="external text" href="https://archive.today/20170909084942/https://marc.info/?l=freedos-dev&m=101783474625117">Archived</a> from the original on 2017-09-09<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-09-09</span></span>.</cite> (NB. Mentions a number of magic values used by <a href="IBM_PC" class="mw-redirect" title="IBM PC">IBM PC</a>-compatible <a href="BIOS" title="BIOS">BIOSes</a> (0000h, 1234h), <a href="DOS" title="DOS">DOS</a> memory managers like <a href="EMM386" title="EMM386">EMM386</a> (1234h) and disk caches like <a href="SMARTDRV" class="mw-redirect" title="SMARTDRV">SMARTDRV</a> (EBABh, BABEh) and NWCACHE (0EDCh, EBABh, 6756h).)</span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://neosmart.net/wiki/mbr-boot-process/">"The BIOS/MBR Boot Process"</a>. <i>NeoSmart Knowledgebase</i>. 2015-01-25. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20230326024702/https://neosmart.net/wiki/mbr-boot-process/">Archived</a> from the original on 2023-03-26<span class="reference-accessdate">. Retrieved <span class="nowrap">2019-02-03</span></span>.</cite></span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://e2e.ti.com/support/wireless_connectivity/f/307/p/131036/589272.aspx">"TI E2E Community: Does anyone know if the following configurations can be done with MCP CLI Tool?"</a>. <i>Texas Instruments</i>. 2011-08-27. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20221007161243/https://e2e.ti.com/support/processors-group/processors/f/processors-forum/589272/ccs-tms320c5545-c5545-uart_test-to-run-without-msp430">Archived</a> from the original on 2022-10-07.</cite></span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><cite id="CITEREFPoley2009" class="citation web cs1">Poley, Josh (2009-09-30). <a rel="nofollow" class="external text" href="https://learn.microsoft.com/en-us/previous-versions/software-testing/ee621251(v=msdn.10)">"Magic Numbers: Integers"</a>. <i>Learn</i>. <a href="Microsoft" title="Microsoft">Microsoft</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20230328134018/https://learn.microsoft.com/en-us/previous-versions/software-testing/ee621251%28v=msdn.10%29">Archived</a> from the original on 2023-03-28.</cite></span>
</li>
<li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><cite id="CITEREFNewcomer2001" class="citation web cs1">Newcomer, Joseph M. (2001-10-13). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20050421023819/https://www.developerfusion.com/show/1713/4/">"Message Management: Guaranteeing uniqueness"</a>. <i>Developer Fusion</i>. Archived from <a rel="nofollow" class="external text" href="http://www.developerfusion.co.uk/show/1713/4/">the original</a> on 2005-04-21<span class="reference-accessdate">. Retrieved <span class="nowrap">2007-11-16</span></span>.</cite></span>
</li>
<li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><cite id="CITEREFOsterman2005" class="citation web cs1">Osterman, Larry (2005-07-21). <a rel="nofollow" class="external text" href="https://learn.microsoft.com/en-us/archive/blogs/larryosterman/uuids-are-only-unique-if-you-generate-them">"UUIDs are only unique if you generate them..."</a> <i>Larry Osterman's WebLog - Confessions of an Old Fogey</i>. MSDN. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20230328134453/https://learn.microsoft.com/en-us/archive/blogs/larryosterman/uuids-are-only-unique-if-you-generate-them">Archived</a> from the original on 2023-03-28<span class="reference-accessdate">. Retrieved <span class="nowrap">2007-11-16</span></span>.</cite></span>
</li>
<li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc9562">"RFC 9562 - Universally Unique IDentifiers (UUIDs)"</a>. <i>ietf.org</i>. May 2024<span class="reference-accessdate">. Retrieved <span class="nowrap">2024-08-09</span></span>.</cite></span>
</li>
<li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.oracle.com/java/technologies/javase/family-clsid.html">"Deploying Java Applets With Family JRE Versions in Java Plug-in for Internet Explorer"</a>. <a href="Oracle_Corporation" title="Oracle Corporation">Oracle</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20221130180350/https://www.oracle.com/java/technologies/javase/family-clsid.html">Archived</a> from the original on 2022-11-30<span class="reference-accessdate">. Retrieved <span class="nowrap">2023-03-28</span></span>.</cite></span>
</li>
<li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.gnu.org/software/grub/manual/html_node/BIOS-installation.html">"GNU GRUB Installation, Section 3.4: BIOS installation"</a>. <i>Gnu.org</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20230315232257/https://www.gnu.org/software/grub/manual/grub/html_node/BIOS-installation.html">Archived</a> from the original on 2023-03-15<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-06-26</span></span>.</cite></span>
</li>
<li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><cite id="CITEREFHeddings2014" class="citation web cs1">Heddings, Lowell (2014-11-03). <a rel="nofollow" class="external text" href="https://www.howtogeek.com/201059/magic-numbers-the-secret-codes-that-programmers-hide-in-your-pc/">"Magic Numbers: The Secret Codes that Programmers Hide in Your PC"</a>. <i>How-To Geek</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20230326024750/https://www.howtogeek.com/201059/magic-numbers-the-secret-codes-that-programmers-hide-in-your-pc/">Archived</a> from the original on 2023-03-26<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-10-03</span></span>.</cite></span>
</li>
<li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><cite id="CITEREFCavit2012" class="citation web cs1">Cavit, Doug (2012-04-24). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180726103946/https://cloudblogs.microsoft.com/microsoftsecure/2012/04/24/guarding-against-re-use-of-stale-object-references/">"Guarding against re-use of stale object references"</a>. <i>Microsoft Secure</i>. Archived from <a rel="nofollow" class="external text" href="https://cloudblogs.microsoft.com/microsoftsecure/2012/04/24/guarding-against-re-use-of-stale-object-references/">the original</a> on 2018-07-26<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-07-26</span></span>.</cite></span>
</li>
<li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><cite id="CITEREFBoleyn1995" class="citation web cs1">Boleyn, Erich Stefan (1995-04-04). <a rel="nofollow" class="external text" href="http://ftp.lyx.org/pub/mach/mach4/multiboot/multiboot-archive">"Comments on the 'MultiBoot Standard' proposal"</a>. <i>Uruk.org</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20230326024756/http://ftp.lyx.org/pub/mach/mach4/multiboot/multiboot-archive">Archived</a> from the original on 2023-03-26.</cite></span>
</li>
<li id="cite_note-developer.apple.com-24"><span class="mw-cite-backlink">^ <a href="#cite_ref-developer.apple.com_24-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-developer.apple.com_24-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-developer.apple.com_24-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-developer.apple.com_24-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-developer.apple.com_24-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-developer.apple.com_24-5"><sup><i><b>f</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20181213234116/https://developer.apple.com/library/archive/technotes/tn2151/_index.html">"Technical Note TN2151: Understanding and Analyzing Application Crash Reports"</a>. <i>Apple Developer Documentation</i>. 2009-01-29. Archived from <a rel="nofollow" class="external text" href="https://developer.apple.com/library/archive/technotes/tn2151/_index.html">the original</a> on 2018-12-13.</cite></span>
</li>
<li id="cite_note-Win32CRTDebugHeapInternals-25"><span class="mw-cite-backlink">^ <a href="#cite_ref-Win32CRTDebugHeapInternals_25-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Win32CRTDebugHeapInternals_25-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Win32CRTDebugHeapInternals_25-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Win32CRTDebugHeapInternals_25-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Win32CRTDebugHeapInternals_25-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-Win32CRTDebugHeapInternals_25-5"><sup><i><b>f</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFBirkett" class="citation web cs1">Birkett, Andrew. <a rel="nofollow" class="external text" href="http://www.nobugs.org/developer/win32/debug_crt_heap.html">"Win32 Debug CRT Heap Internals"</a>. <i>Nobugs.org</i>.</cite></span>
</li>
<li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><cite id="CITEREFMcNamara2012" class="citation web cs1">McNamara, Paul (2012-07-19). <a rel="nofollow" class="external text" href="https://www.networkworld.com/article/2222804/microsoft-code-contains-the-phrase--big-boobs------yes--really.html">"Microsoft code contains the phrase 'big boobs' ... Yes, really"</a>. <i>Network World</i>.</cite></span>
</li>
<li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><cite class="citation cs2"><a rel="nofollow" class="external text" href="https://github.com/WebKit/WebKit/blob/226b2f3cb9fa175dbf0a8025d882ac3b168b7547/Source/WTF/wtf/Assertions.cpp"><i>WebKit</i></a>, The WebKit Open Source Project, 2023-01-06<span class="reference-accessdate">, retrieved <span class="nowrap">2023-01-06</span></span></cite></span>
</li>
<li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/google/sanitizers/wiki/AddressSanitizer#faq">"AddressSanitizer - FAQ"</a>. <i><a href="GitHub" title="GitHub">GitHub</a></i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-05-18</span></span>.</cite></span>
</li>
<li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://pdos.csail.mit.edu/6.828/2008/readings/i386/INT.htm">"INTEL 80386 PROGRAMMER'S REFERENCE MANUAL"</a>. <a href="MIT" class="mw-redirect" title="MIT">MIT</a>.</cite></span>
</li>
<li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-30">^</a></b></span> <span class="reference-text"><cite id="CITEREFScheppner" class="citation web cs1">Scheppner, Carolyn. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20110718163417/http://cataclysm.cx/random/amiga/reference/AmigaMail_Vol2_guide/node0053.html">"Amiga Mail Vol.2 Guide"</a>. <i>Cataclysm.cx</i>. Archived from <a rel="nofollow" class="external text" href="http://cataclysm.cx/random/amiga/reference/AmigaMail_Vol2_guide/node0053.html">the original</a> on 2011-07-18<span class="reference-accessdate">. Retrieved <span class="nowrap">2010-08-20</span></span>.</cite></span>
</li>
<li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-0xdeaddead--manually-initiated-crash1">"Bug Check 0xDEADDEAD MANUALLY_INITIATED_CRASH1"</a>. <i>Microsoft Documentation</i>. 2023-06-19.</cite></span>
</li>
<li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-32">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://discussions.apple.com/thread/252054569">"Safari Version 14.0.1 Unexpectedly Quits"</a>.</cite></span>
</li>
<li id="cite_note-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-33">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.devicetree.org/specifications/">"Device Tree Specification"</a>.</cite></span>
</li>
<li id="cite_note-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-34">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l?view=vs-2017">"strncat_s, _strncat_s_l, wcsncat_s, _wcsncat_s_l, _mbsncat_s, _mbsncat_s_l"</a>. <i>Microsoft Documentation</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2019-01-16</span></span>.</cite></span>
</li>
</ol></div></div>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Computer_files91" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div id="Computer_files91" style="font-size:114%;margin:0 4em"><a href="Computer_file" title="Computer file">Computer files</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">Types</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Binary_file" title="Binary file">Binary file</a> / <a href="Text_file" title="Text file">text file</a></li>
<li><a href="Data_file" title="Data file">Data file</a></li>
<li><a href="File_format" title="File format">File format</a>
<ul><li><a href="List_of_file_formats" title="List of file formats">List of file formats</a></li>
<li><a href="List_of_file_signatures" title="List of file signatures">File signatures</a></li>
<li><a href="Open_file_format" title="Open file format">Open file formats</a></li>
<li><a href="Proprietary_file_format" title="Proprietary file format">Proprietary file formats</a></li></ul></li>
<li><a href="Metafile" class="mw-redirect" title="Metafile">Metafile</a></li>
<li><a href="Sidecar_file" title="Sidecar file">Sidecar file</a></li>
<li><a href="Sparse_file" title="Sparse file">Sparse file</a></li>
<li><a href="Swap_file" class="mw-redirect" title="Swap file">Swap file</a></li>
<li><a href="System_file" title="System file">System file</a></li>
<li><a href="Temporary_file" title="Temporary file">Temporary file</a></li>
<li><a href="Zero-byte_file" title="Zero-byte file">Zero-byte file</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Properties</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Filename" title="Filename">Filename</a>
<ul><li><a href="8.3_filename" title="8.3 filename">8.3 filename</a></li>
<li><a href="Long_filename" title="Long filename">Long filename</a></li>
<li><a href="Filename_mangling" title="Filename mangling">Filename mangling</a></li></ul></li>
<li><a href="Filename_extension" title="Filename extension">Filename extension</a>
<ul><li><a href="List_of_filename_extensions" title="List of filename extensions">List of filename extensions</a></li></ul></li>
<li><a href="File_attribute" title="File attribute">File attribute</a>
<ul><li><a href="Extended_file_attributes" title="Extended file attributes">Extended file attributes</a></li></ul></li>
<li><a href="File_size" title="File size">File size</a></li>
<li><a href="Hidden_file_and_hidden_directory" title="Hidden file and hidden directory">Hidden file / Hidden directory</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Organisation</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Directory_(computing)" title="Directory (computing)">Directory/folder</a>
<ul><li><a href="NTFS_links" title="NTFS links">NTFS links</a></li>
<li><a href="Temporary_folder" title="Temporary folder">Temporary folder</a></li></ul></li>
<li><a href="Directory_structure" title="Directory structure">Directory structure</a></li>
<li><a href="File_system" title="File system">File system</a>
<ul><li><a href="Filesystem_Hierarchy_Standard" title="Filesystem Hierarchy Standard">Filesystem Hierarchy Standard</a></li>
<li><a href="Grid_file_system" title="Grid file system">Grid file system</a></li>
<li><a href="Semantic_file_system" title="Semantic file system">Semantic file system</a></li></ul></li>
<li><a href="Path_(computing)" title="Path (computing)">Path</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="File_operation" class="mw-redirect" title="File operation">Operations</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Open_(system_call)" title="Open (system call)">Open</a></li>
<li><a href="Close_(system_call)" title="Close (system call)">Close</a></li>
<li><a href="Read_(system_call)" title="Read (system call)">Read</a></li>
<li><a href="Write_(system_call)" title="Write (system call)">Write</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Linking</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="File_descriptor" title="File descriptor">File descriptor</a></li>
<li><a href="Hard_link" title="Hard link">Hard link</a></li>
<li><a href="Shortcut_(computing)" title="Shortcut (computing)">Shortcut</a>
<ul><li><a href="Alias_(Mac_OS)" title="Alias (Mac OS)">Alias</a></li>
<li><a href="Shadow_(OS/2)" title="Shadow (OS/2)">Shadow</a></li></ul></li>
<li><a href="Symbolic_link" title="Symbolic link">Symbolic link</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Management</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Backup" title="Backup">Backup</a></li>
<li><a href="File_comparison" title="File comparison">File comparison</a></li>
<li><a href="File_copying" title="File copying">File copying</a></li>
<li><a href="Data_compression" title="Data compression">Data compression</a></li>
<li><a href="File_manager" title="File manager">File manager</a>
<ul><li><a href="Comparison_of_file_managers" title="Comparison of file managers">Comparison of file managers</a></li></ul></li>
<li><a href="File_system_fragmentation" title="File system fragmentation">File system fragmentation</a></li>
<li><a href="File-system_permissions" title="File-system permissions">File-system permissions</a></li>
<li><a href="File_transfer" title="File transfer">File transfer</a>
<ul><li><a href="File_sharing" title="File sharing">File sharing</a></li>
<li><a href="File_synchronization" title="File synchronization">File synchronization</a></li></ul></li>
<li><a href="File_verification" title="File verification">File verification</a></li></ul>
</div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-20" href="https://en.wikipedia.org/wiki/?title=Magic_number_(programming)&oldid=1301502809">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>